<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="css/style.css"/>
    <link rel="stylesheet" href="assets/css/ace.min.css"/>
    <link rel="stylesheet" href="assets/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="Widget/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link href="Widget/icheck/icheck.css" rel="stylesheet" type="text/css"/>
    <!--[if IE 7]>
    <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
    <![endif]-->
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/typeahead-bs2.min.js"></script>
    <!-- page specific plugin scripts -->
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/jquery.dataTables.bootstrap.js"></script>
    <script type="text/javascript" src="js/H-ui.js"></script>
    <script type="text/javascript" src="js/H-ui.admin.js"></script>
    <script src="assets/layer/layer.js" type="text/javascript"></script>
    <script src="assets/laydate/laydate.js" type="text/javascript"></script>
    <script type="text/javascript" src="Widget/zTree/js/jquery.ztree.all-3.5.min.js"></script>
    <script src="js/lrtk.js" type="text/javascript"></script>
    <style>
        #sample-table_filter {
            display: none !important;
        }
    </style>
    <title>我的购买记录</title>
</head>
<body>
<div class=" page-content clearfix">
    <div id="products_style">
        <div class="search_style">

            <ul class="search_content clearfix">
                <li><label class="l_f">店铺名称</label><input name="" type="text" class="text_add" placeholder="输入店铺名称"
                                                          style=" width:200px"/></li>
                <li><label class="l_f">商品名称</label><input name="" type="text" class="text_add" placeholder="输入商品名称"
                                                          style=" width:200px"/></li>
                <li style="width:90px;">
                    <button type="button" class="btn_search"><i class="icon-search"></i>查询</button>
                </li>
            </ul>
        </div>
        <div class="border clearfix">
       <span class="l_f">
	  	<a href="javascript:;" id="logistic_add" class="btn btn-warning"><i class="icon-plus"></i>添加购买记录</a>
       </span>

        </div>
        <table class="table table-striped table-bordered table-hover" id="sample-table">
            <thead>
            <tr>
                <th width="60">序号</th>
                <th width="100">商品编码</th>
                <th width="100">商品名称</th>
                <th width="100">获得积分</th>
                <th width="100">剩余积分</th>
                <th width="100">购买店铺</th>
                <th width="100">店铺地址</th>
                <th width="100">店铺电话号码</th>
                <th width="100">购买日期</th>
                <th width="100">备注</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>1</td>
                <td>NJ20160705000001</td>
                <td>旭派电池</td>
                <td>+350</td>
                <td>1152</td>
                <td>旭派电池旗舰店</td>
                <td>湖北武汉xx区xx路16号</td>
                <td>17854621415</td>
                <td>2016-12-12 08:12:12</td>
                <td>111111111</td>

            </tr>
            <tr>
                <td>2</td>
                <td>NJ20160705000001</td>
                <td>旭派电池</td>
                <td>+350</td>
                <td>802</td>
                <td>旭派电池旗舰店</td>
                <td>湖北武汉xx区xx路16号</td>
                <td>17854621415</td>
                <td>2016-11-12 08:12:12</td>
                <td>111111111</td>

            </tr>
            <tr>
                <td>3</td>
                <td>NJ20160705000001</td>
                <td>旭派电池</td>
                <td>+350</td>
                <td>452</td>
                <td>旭派电池旗舰店</td>
                <td>湖北武汉xx区xx路16号</td>
                <td>17854621415</td>
                <td>2016-10-12 08:12:12</td>
                <td>111111111</td>
            </tr>
            <tr>
                <td>4</td>
                <td>NJ20160705000001</td>
                <td>旭派电池</td>
                <td>+350</td>
                <td>102</td>
                <td>旭派电池旗舰店</td>
                <td>湖北武汉xx区xx路16号</td>
                <td>17854621415</td>
                <td>2016-9-12 08:12:12</td>
                <td>111111111</td>
            </tr>
            </tbody>
        </table>

    </div>
</div>
<!--添加购买记录图层-->
<div class="add_menber" id="add_menber_style" style="display:none">

    <ul class=" page-content">
        <div class="Operate_cont clearfix">
            <label class="form-label">请输入商品编码：</label>

            <div class="formControls ">
                <input type="text" class="input-text" value="" placeholder="请输入商品编码" id="user-name" name="商品编码">
            </div>
        </div>

    </ul>
</div>
<div class="add_menber" id="add_menber_style1" style="display:none">
    <div class="Operate_cont clearfix" style="width: 100%">
        <!--style="display: none"-->
        <label class="form-label" style=" width: 100%;text-align: center;">购买信息</label>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">商品激活码：</label>
        <div class="formControls ">
            NJ20160705000001
        </div>
    </div>

    <div class="Operate_cont clearfix">
        <label class="form-label">商品名称：</label>
        <div class="formControls ">
            旭派电池
        </div>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">购买店铺：</label>
        <div class="formControls ">
            旭派电池旗舰店
        </div>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">店铺地址：</label>
        <div class="formControls ">
            湖北武汉xx区xx路16号
        </div>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">店铺电话号码：</label>
        <div class="formControls ">
            17854621415
        </div>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">可获积分：</label>
        <div class="formControls ">
            350
        </div>
    </div>
    <div class="Operate_cont clearfix">
        <label class="form-label">购买日期：</label>
        <div class="formControls ">
            2016-12-12 08:12:12
        </div>
    </div>
</div>
</body>
</html>
<script>
    /*物流公司-添加*/
    $('#logistic_add').on('click', function () {
        layer.open({
            type: 1,
            title: '查询',
            maxmin: true,
            shadeClose: true, //点击遮罩关闭层
            area: ['600px', ''],
            content: $('#add_menber_style'),
            btn: ['查询', '取消'],
            yes: function (index, layero) {
                var num = 0;
                var str = "";
                $(".add_menber input[type$='text']").each(function (n) {
                    if ($(this).val() == "") {

                        layer.alert(str += "" + $(this).attr("name") + "不能为空！\r\n", {
                            title: '提示框',
                            icon: 0,
                        });
                        num++;
                        return false;
                    }
                });
                if (num > 0) {
                    return false;
                }
                else {
                    layer.open({
                        type: 1,
                        title: '添加购买记录',
                        maxmin: true,
                        shadeClose: true, //点击遮罩关闭层
                        area: ['600px', ''],
                        content: $('#add_menber_style1'),
                        btn: ['添加', '取消'],
                        yes: function (index, layero) {
                            var num = 0;
                            var str = "";
                            $(".add_menber input[type$='text']").each(function (n) {
                                if ($(this).val() == "") {

                                    layer.alert(str += "" + $(this).attr("name") + "不能为空！\r\n", {
                                        title: '提示框',
                                        icon: 0,
                                    });
                                    num++;
                                    return false;
                                }
                            });
                            if (num > 0) {
                                return false;
                            }
                            else {
                                layer.alert('添加成功！', {
                                    title: '提示框',
                                    icon: 1,
                                });
                                layer.close(index);
                            }
                        }
                    });
                    layer.close(index);
                }
            }
        });
    });
    jQuery(function ($) {
        var oTable1 = $('#sample-table').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable": false, "aTargets": [0]}// 制定列不参与排序
            ]
        });


        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function () {
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });

        });


        $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();

            var off2 = $source.offset();
            var w2 = $source.width();

            if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
            return 'left';
        }
    });

    $(function () {
        $("#products_style").fix({
            float: 'left',
            //minStatue : true,
            skin: 'green',
            durationTime: false,
            spacingw: 30,//设置隐藏时的距离
            spacingh: 260,//设置显示时间距
        });
    });
</script>
<script type="text/javascript">
    //初始化宽度、高度
    $(".widget-box").height($(window).height() - 215);
    $(".table_menu_list").width($(window).width() - 260);
    $(".table_menu_list").height($(window).height() - 215);
    //当文档窗口发生改变时 触发
    $(window).resize(function () {
        $(".widget-box").height($(window).height() - 215);
        $(".table_menu_list").width($(window).width() - 260);
        $(".table_menu_list").height($(window).height() - 215);
    });
    //面包屑返回值
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.iframeAuto(index);
    $('.Order_form').on('click', function () {
        var cname = $(this).attr("title");
        var chref = $(this).attr("href");
        var cnames = parent.$('.Current_page').html();
        var href = parent.$("#iframe").attr("src");
        parent.$('#parentIframe').html(cname);
        parent.$('#iframe').attr("src", chref).ready();
        ;
        parent.$('#parentIframe').css("display", "inline-block");
        parent.$('.Current_page').attr({"name": href, "href": "javascript:void(0)"}).css({
            "color": "#4c8fbd",
            "cursor": "pointer"
        });
        //parent.$('.Current_page').html("<a href='javascript:void(0)' name="+href+" class='iframeurl'>" + cnames + "</a>");
        parent.layer.close(index);

    });
</script>
